package com.mondo.financialwallet.presentation.model;

import java.io.Serializable;
import java.text.DecimalFormat;

public class HotProducts implements Serializable {

    private int id;

    private String title; // = "猎豹量化基金";

    private String annualizedRate; // = "90%";

    private String minimumAmount; // = "$100,000起购 浮动收益类";

    private String minimumDay; // = "180";

    private int type;

    public HotProducts(int type, int id, String title, String annualizedRate, String minimumAmount, String minimumDay) {
        this.id = id;
        this.type = type;
        this.title = title;

        this.annualizedRate = annualizedRate;

        this.minimumAmount = minimumAmount;

        this.minimumDay = minimumDay;
    }

    public int getId() {
        return id;
    }

    public String getTitle() {
        return title;
    }

    public String getAnnualizedRate() {
        return ((int)Float.parseFloat(annualizedRate)) + "%";
    }

    public String getMinimumAmount() {
        return new DecimalFormat("##,###,###.####")
                .format(Double.parseDouble(minimumAmount));
    }

    public int getType() {
        return type;
    }

    public String getOriginalMinimumAmount(){
        return minimumAmount;
    }

    public String getMinimumDay() {
        return minimumDay;
    }

}
